@extends("layouts.backend.webadmin")

@section('content')
    <style>
        #searchCategory{
            border-radius:0px;}
    </style>
<link rel="stylesheet" href="{{env('APP_ROOT')}}/assets/select2/css/select2.min.css">
<link rel="stylesheet" href="{{env('APP_ROOT')}}/assets/select2/css/select2totree.css">
<link rel="stylesheet" href="{{env('APP_ROOT')}}/assets/layui/css/layui.css">
<link rel="stylesheet" href="{{env('APP_ROOT')}}/css/vulslist.css">
<script src="{{env('APP_ROOT')}}/assets/layui/layui.all.js"></script>
<!-- Content Header (Page header) -->

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">


                </div>
                <!-- 搜索开始-->
                <form class="form-inline" role="form" action="{{ URL::route('admin.flaw.search') }}" method="post" onsubmit="return checkForm()">
                    <div class="box-body">
                        <!-- /.row -->
                    </div>
                    {!! csrf_field() !!}
                </form>
                <!-- 搜索结束-->
                <!-- /.box-header -->
                <div class="box-body1">
                    <table id="leveltable" class="table table-bordered table-striped">
                        <thead>
                        <tr>
{{--                            <th>#</th>--}}
                            <th>编号</th>
                            <th>标题</th>
                            <th>应用名称</th>
                            <th>所属分类</th>
                            <th>漏洞级别</th>
{{--                            <th>积分 / 安全币</th>--}}
                            <th>状态</th>
                            {{--功能暂不开放 --start --}}
{{--                            <th>是否删除</th>
                            <th>删除日期</th>--}}
                            {{--功能暂不开放 --end --}}
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach ($lists as $list)
                        <tr>
                            <td>@if($list->vuls_number){{$list->vuls_number}}
                                @endif</td>
                            <td>{{$list->title}}</td>
                            <td>{{$list->appname}}</td>
                            <td>{{$list->cname}}</td>
                            <td>{{$list->lname}}</td>
                            <td>{{$vulStatus[$list->status][0]}}</td>
                            <td>      <a class="btn btn-success btn-sm" href="{{ URL::route('admin.distribute.det',['id'=>$list->vuls_id]) }}" role="button"><i class="fa fa-pencil fa-fw"></i>漏洞详情</a></td>
                        </tr>
                        @endforeach
                        </tbody>
                    </table>
                    {{$lists->links()}}
                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>
        <!-- /.col -->
    </div>
    <!-- /.row -->
    <!-- 弹出层 重新编辑等级 -->



    <!-- 弹出层 分派结束-->

</section>
<!-- /.content -->
@stop

@section('javascript-end')
    <script src="{{env('APP_ROOT')}}/assets/select2/js/select2.min.js"></script>
    <script src="{{env('APP_ROOT')}}/assets/select2/js/select2totree.js"></script>
    <script>
        $('#searchCategory').select2ToTree({"border-radius":'0px'});
        $('#leveltable').DataTable({
            'paging'      : false,
            'lengthChange': false,
            'searching'   : false,
            'ordering'    : false,
            'info'        : false,
            'autoWidth'   : true,
            'pagingType': "simple_numbers",  //分页样式：simple,simple_numbers,full,full_numbers
            'oLanguage'     :{
                'sUrl'    : '{{env("APP_ROOT")}}/assets/bootstrap/js/zh_cn.json'
            }
        });
    </script>

@endsection